import { createRouter, createWebHistory } from 'vue-router'
export const ophead = [
  {
    path: '/time',
    name: 'time',
    meta: {
      title: '页面'
    },
    children: [
      {
        path: '/time/index',
        name: 'index',
        meta: {
          title: '页面1'
        },
        component: () => import('@/views/time/index.vue'),
      },
      {
        path: '/time/open',
        name: 'open',
        meta: {
          title: '页面2'
        },
        component: () => import('@/views/time/open.vue'),
      },
    ]
  }
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/hone/home.vue'),
      children:ophead,
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/login/login.vue')
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('@/views/index/index.vue')
    },
    {
      path: '/index/icon',
      name: 'icon',
      component: () => import('@/views/index/icon.vue')
    },
    {
      path: '/index/open',
      name: 'open',
      component: () => import('@/views/index/open.vue')
    },
    {
      path: '/res',
      name: 'res',
      component: () => import('@/views/res/res.vue')
    },
  ],
})

export default router
